#include <stdio.h>

void hieth_set_regbit(unsigned long va, int vb, int vc)
{
    /*1149:	f3 0f 1e fa          	endbr64 
    114d:	55                   	push   %rbp
    114e:	48 89 e5             	mov    %rsp,%rbp
    1151:	48 83 ec 20          	sub    $0x20,%rsp
    1155:	48 89 7d e8          	mov    %rdi,-0x18(%rbp)	// 0x101e001c
    1159:	89 75 e4             	mov    %esi,-0x1c(%rbp)	// 0x1
    115c:	89 55 e0             	mov    %edx,-0x20(%rbp)	// 0xc
    115f:	b8 ff ff ff ff       	mov    $0xffffffff,%eax	
    1164:	48 89 45 f8          	mov    %rax,-0x8(%rbp)*/
		unsigned long a = 0xffffffff;		

    /*1168:	83 7d e4 00          	cmpl   $0x0,-0x1c(%rbp)
    116c:	0f 95 c0             	setne  %al
    116f:	0f b6 c0             	movzbl %al,%eax
    1172:	89 45 e4             	mov    %eax,-0x1c(%rbp)*/
		vb = (vb != 0);

    /*1175:	83 7d e4 00          	cmpl   $0x0,-0x1c(%rbp)
    1179:	74 09                	je     1184 <hieth_set_regbit+0x3b>
    117b:	48 8d 05 86 0e 00 00 	lea    0xe86(%rip),%rax        # 2008 <_IO_stdin_used+0x8>	// Ture
    1182:	eb 07                	jmp    118b <hieth_set_regbit+0x42>
    1184:	48 8d 05 82 0e 00 00 	lea    0xe82(%rip),%rax        # 200d <_IO_stdin_used+0xd>	// Flase
    118b:	48 89 c6             	mov    %rax,%rsi
    118e:	48 8d 3d 7e 0e 00 00 	lea    0xe7e(%rip),%rdi        # 2013 <_IO_stdin_used+0x13>
    1195:	b8 00 00 00 00       	mov    $0x0,%eax
    119a:	e8 b1 fe ff ff       	callq  1050 <printf@plt> */
		if (vb != 0) {
			printf("%s\n", "True");
		}
		else {
			printf("%s\n", "Flase");
		}

    /*119f:	8b 45 e0             	mov    -0x20(%rbp),%eax		// eax=vc
    11a2:	ba 01 00 00 00       	mov    $0x1,%edx			// edx=vb
    11a7:	89 c1                	mov    %eax,%ecx			// ecx=vc
    11a9:	d3 e2                	shl    %cl,%edx				// edx=vb<<vc
    11ab:	89 d0                	mov    %edx,%eax			// eax=vb<<vc
    11ad:	f7 d0                	not    %eax					// eax=!(vb<<vc)
    11af:	48 98                	cltq   
    11b1:	48 21 45 f8          	and    %rax,-0x8(%rbp)		*/
		a = a & ~(vb<<vc);

    /*11b5:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
    11b9:	48 89 c6             	mov    %rax,%rsi
    11bc:	48 8d 3d 5a 0e 00 00 	lea    0xe5a(%rip),%rdi        # 201d <_IO_stdin_used+0x1d>
    11c3:	b8 00 00 00 00       	mov    $0x0,%eax
    11c8:	e8 83 fe ff ff       	callq  1050 <printf@plt> */
		printf("%lx\n", a);

    /*11cd:	8b 45 e0             	mov    -0x20(%rbp),%eax		// eax=vc
    11d0:	8b 55 e4             	mov    -0x1c(%rbp),%edx		// edx=vb
    11d3:	89 c1                	mov    %eax,%ecx			// ecx=vc
    11d5:	d3 e2                	shl    %cl,%edx				// edx=vb<<vc
    11d7:	89 d0                	mov    %edx,%eax			// eax=vb<<vc
    11d9:	48 98                	cltq   
    11db:	48 09 45 f8          	or     %rax,-0x8(%rbp)*/
		a = a | (vb<<vc);
		
    /*11df:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
    11e3:	48 89 c6             	mov    %rax,%rsi
    11e6:	48 8d 3d 3d 0e 00 00 	lea    0xe3d(%rip),%rdi        # 202a <_IO_stdin_used+0x2a>
    11ed:	b8 00 00 00 00       	mov    $0x0,%eax
    11f2:	e8 59 fe ff ff       	callq  1050 <printf@plt> */
		printf("%lx\n", a);

    /*11f7:	48 c7 45 f8 00 00 00 	movq   $0x0,-0x8(%rbp)
    11fe:	00 */
		a = 0x0;

    /*11ff:	83 7d e4 00          	cmpl   $0x0,-0x1c(%rbp)
    1203:	0f 95 c0             	setne  %al
    1206:	0f b6 c0             	movzbl %al,%eax
    1209:	89 45 e4             	mov    %eax,-0x1c(%rbp) */
		vb = (vb != 0);

    /*120c:	83 7d e4 00          	cmpl   $0x0,-0x1c(%rbp)
    1210:	74 09                	je     121b <hieth_set_regbit+0xd2>
    1212:	48 8d 05 ef 0d 00 00 	lea    0xdef(%rip),%rax        # 2008 <_IO_stdin_used+0x8>
    1219:	eb 07                	jmp    1222 <hieth_set_regbit+0xd9>
    121b:	48 8d 05 eb 0d 00 00 	lea    0xdeb(%rip),%rax        # 200d <_IO_stdin_used+0xd>
    1222:	48 89 c6             	mov    %rax,%rsi
    1225:	48 8d 3d e7 0d 00 00 	lea    0xde7(%rip),%rdi        # 2013 <_IO_stdin_used+0x13>
    122c:	b8 00 00 00 00       	mov    $0x0,%eax
    1231:	e8 1a fe ff ff       	callq  1050 <printf@plt> */
		if (vb != 0) {
			printf("%s\n", "True");
		}
		else {
			printf("%s\n", "Flase");
		}

    /*1236:	8b 45 e0             	mov    -0x20(%rbp),%eax	// eax=vc
    1239:	ba 01 00 00 00       	mov    $0x1,%edx
    123e:	89 c1                	mov    %eax,%ecx	// ecx=vc
    1240:	d3 e2                	shl    %cl,%edx		// edx=1<<vc
    1242:	89 d0                	mov    %edx,%eax
    1244:	f7 d0                	not    %eax			// ~(1<<vc)
    1246:	48 98                	cltq   
    1248:	48 21 45 f8          	and    %rax,-0x8(%rbp)	// a & ~(1<<vc) */
		a = a & ~(1<<vc);

    /*124c:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
    1250:	48 89 c6             	mov    %rax,%rsi
    1253:	48 8d 3d c3 0d 00 00 	lea    0xdc3(%rip),%rdi        # 201d <_IO_stdin_used+0x1d>
    125a:	b8 00 00 00 00       	mov    $0x0,%eax
    125f:	e8 ec fd ff ff       	callq  1050 <printf@plt>*/
		printf("%lx\n", a);

    /*1264:	8b 45 e0             	mov    -0x20(%rbp),%eax
    1267:	8b 55 e4             	mov    -0x1c(%rbp),%edx
    126a:	89 c1                	mov    %eax,%ecx
    126c:	d3 e2                	shl    %cl,%edx
    126e:	89 d0                	mov    %edx,%eax
    1270:	48 98                	cltq   
    1272:	48 09 45 f8          	or     %rax,-0x8(%rbp) */
		a = a | (vb<<vc);

    /*1276:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
    127a:	48 89 c6             	mov    %rax,%rsi
    127d:	48 8d 3d a6 0d 00 00 	lea    0xda6(%rip),%rdi        # 202a <_IO_stdin_used+0x2a>
    1284:	b8 00 00 00 00       	mov    $0x0,%eax
    1289:	e8 c2 fd ff ff       	callq  1050 <printf@plt> */
		printf("%lx\n", a);

    /*128e:	90                   	nop
    128f:	c9                   	leaveq 
    1290:	c3                   	retq   */
}

void perfect()
{
    /*1291:	f3 0f 1e fa          	endbr64 
    1295:	55                   	push   %rbp
    1296:	48 89 e5             	mov    %rsp,%rbp
    1299:	ba 04 00 00 00       	mov    $0x4,%edx
    129e:	be 05 00 00 00       	mov    $0x5,%esi
    12a3:	48 8d 3d 8e 0d 00 00 	lea    0xd8e(%rip),%rdi        # 2038 <_IO_stdin_used+0x38>
    12aa:	b8 00 00 00 00       	mov    $0x0,%eax
    12af:	e8 9c fd ff ff       	callq  1050 <printf@plt>*/
		printf("%d %d\n", 0x5, 0x4);

    /*12b4:	90                   	nop
    12b5:	5d                   	pop    %rbp
    12b6:	c3                   	retq   */
}

void perfect2()
{
    /*12b7:	f3 0f 1e fa          	endbr64 
    12bb:	55                   	push   %rbp
    12bc:	48 89 e5             	mov    %rsp,%rbp
    12bf:	be 05 00 00 00       	mov    $0x5,%esi
    12c4:	48 8d 3d 8d 0d 00 00 	lea    0xd8d(%rip),%rdi        # 2058 <_IO_stdin_used+0x58>
    12cb:	b8 00 00 00 00       	mov    $0x0,%eax
    12d0:	e8 7b fd ff ff       	callq  1050 <printf@plt> */
		printf("%d\n", 0x5);

    /*12d5:	90                   	nop
    12d6:	5d                   	pop    %rbp
    12d7:	c3                   	retq   */
}

int main()
{
    /*12d8:	f3 0f 1e fa          	endbr64 
    12dc:	55                   	push   %rbp
    12dd:	48 89 e5             	mov    %rsp,%rbp
    12e0:	48 83 ec 20          	sub    $0x20,%rsp 
    12e4:	c7 45 e4 01 00 00 00 	movl   $0x1,-0x1c(%rbp) */
		int a = 1;

    /*12eb:	83 7d e4 00          	cmpl   $0x0,-0x1c(%rbp)
    12ef:	0f 94 c0             	sete   %al
    12f2:	0f b6 c0             	movzbl %al,%eax
    12f5:	89 45 e4             	mov    %eax,-0x1c(%rbp) */
		a = !a;

    /*12f8:	8b 45 e4             	mov    -0x1c(%rbp),%eax
    12fb:	89 c6                	mov    %eax,%esi
    12fd:	48 8d 3d 63 0d 00 00 	lea    0xd63(%rip),%rdi        # 2067 <_IO_stdin_used+0x67>
    1304:	b8 00 00 00 00       	mov    $0x0,%eax
    1309:	e8 42 fd ff ff       	callq  1050 <printf@plt> */
		printf("%d\n", a);
		
    /*130e:	b8 00 00 00 00       	mov    $0x0,%eax
    1313:	e8 79 ff ff ff       	callq  1291 <perfect> */
		perfect();

    /*1318:	b8 00 00 00 00       	mov    $0x0,%eax
    131d:	e8 95 ff ff ff       	callq  12b7 <perfect2> */
		perfect2();

    /*1322:	48 c7 45 e8 06 00 10 	movq   $0x100006,-0x18(%rbp)
    1329:	00 */
		unsigned long c = 0x100006;

    /*132a:	48 8b 45 e8          	mov    -0x18(%rbp),%rax
    132e:	48 c1 e8 10          	shr    $0x10,%rax
    1332:	48 89 45 f0          	mov    %rax,-0x10(%rbp) */
		unsigned long d = c >> 0x10;

    /*1336:	48 8b 45 e8          	mov    -0x18(%rbp),%rax	// rax = c
    133a:	83 e0 1f             	and    $0x1f,%eax	// eax = c & 0x1f
    133d:	ba 01 00 00 00       	mov    $0x1,%edx	// edx = 0x1
    1342:	89 c1                	mov    %eax,%ecx	// ecx = c & 0x1f
    1344:	d3 e2                	shl    %cl,%edx		// edx = 0x1 << (c&0x1f)
    1346:	89 d0                	mov    %edx,%eax	// eax = 0x1 << (c&0x1f)
    1348:	8d 50 ff             	lea    -0x1(%rax),%edx	// edx = (0x1 << (c&0x1f))-1
    134b:	48 8b 45 f0          	mov    -0x10(%rbp),%rax	// rax = d
    134f:	89 c1                	mov    %eax,%ecx		// ecx = d
    1351:	d3 e2                	shl    %cl,%edx			// edx = ((0x1 << (c&0x1f))-1) << d
    1353:	89 d0                	mov    %edx,%eax		// eax = ((0x1 << (c&0x1f))-1) << d
    1355:	48 98                	cltq   
    1357:	48 89 45 f8          	mov    %rax,-0x8(%rbp) */
		unsigned long e = ((0x1 << (c&0x1f))-1) << d;

    /*135b:	48 8b 4d f8          	mov    -0x8(%rbp),%rcx
    135f:	48 8b 55 f0          	mov    -0x10(%rbp),%rdx
    1363:	48 8b 45 e8          	mov    -0x18(%rbp),%rax
    1367:	48 89 c6             	mov    %rax,%rsi
    136a:	48 8d 3d 01 0d 00 00 	lea    0xd01(%rip),%rdi        # 2072 <_IO_stdin_used+0x72>
    1371:	b8 00 00 00 00       	mov    $0x0,%eax
    1376:	e8 d5 fc ff ff       	callq  1050 <printf@plt> */
		printf("%ld %ld %ld\n", c, d, e);

    /*137b:	48 8b 45 f8          	mov    -0x8(%rbp),%rax		// rax = e
    137f:	83 e0 01             	and    $0x1,%eax		// eax = e & 0x1
    1382:	48 89 c2             	mov    %rax,%rdx		// rdx = e & 0x1
    1385:	48 8b 45 f0          	mov    -0x10(%rbp),%rax	// rax = d
    1389:	89 c1                	mov    %eax,%ecx		// ecx = d
    138b:	48 d3 ea             	shr    %cl,%rdx			// rdx = (e & 0x1) >> (d&0xff)
    138e:	48 89 d0             	mov    %rdx,%rax		// rax = (e & 0x1) >> (d&0xff)
    1391:	48 89 c6             	mov    %rax,%rsi		// rsi = (e & 0x1) >> (d&0xff)
    1394:	48 8d 3d e3 0c 00 00 	lea    0xce3(%rip),%rdi        # 207e <_IO_stdin_used+0x7e>
    139b:	b8 00 00 00 00       	mov    $0x0,%eax
    13a0:	e8 ab fc ff ff       	callq  1050 <printf@plt>*/
		//printf("%ld\n", (e & 0x1) >> d);

    /*13a5:	89 c6                	mov    %eax,%esi	// 上条printf的返回值，输出了几个字符 
    13a7:	48 8d 3d d4 0c 00 00 	lea    0xcd4(%rip),%rdi        # 2082 <_IO_stdin_used+0x82>
    13ae:	b8 00 00 00 00       	mov    $0x0,%eax
    13b3:	e8 98 fc ff ff       	callq  1050 <printf@plt>*/
		printf("%d\n", printf("%ld\n", (e & 0x1) >> d));

    /*13b8:	b8 00 00 00 00       	mov    $0x0,%eax
    13bd:	c9                   	leaveq 
    13be:	c3                   	retq   
    13bf:	90                   	nop*/

	return 0;
}

